/*
 * @Author: pengtianrui 2276608413@qq.com
 * @Date: 2024-07-19 14:42:56
 * @LastEditors: Wang Shuo wangshuo@sgsimulation.com
 * @LastEditTime: 2024-08-30 11:12:16
 * @FilePath: \SGFEM\DataStructure\FEM\Load\include\FORCE1Data.h
 * @Description: 点载荷（形式1）， 通过两个节点定义载荷方向
 * FORCE1
 */

#pragma once
#include <vector>

#include "DataStructure/Common/DataStructureNamespace.h"
#include "DataStructure/Common/Id.h"
#include "DataStructure/Common/Real.h"
#include "DataStructure/Common/SetBase.h"
#include "DataStructure/Input/Load/LoadTypes.h"

SG_DATASTRUCTURE_FEM_NAMESPACE_OPEN
struct FORCE1Data : public SetBase
{
    SG::DataStructure::Common::Id   m_nodeId   = 0;      ///< 载荷作用节点
    SG::DataStructure::Common::Real m_force    = 0.0;    ///< 载荷大小
    SG::DataStructure::Common::I64  m_gi[2]    = { 0 };  ///< G1 到 G2的单位向量决定载荷方向
    SG::DataStructure::Common::Id   m_domainId = 0;
    static SG::DataStructure::FEM::LoadType GetType ()
    {
        return SG::DataStructure::FEM::LoadType::LOAD_Force1;
    };
};

using FORCE1Array = std::vector<SG::DataStructure::FEM::FORCE1Data>;

/// @brief 节点弯矩1， 弯矩的方向通过两个节点的方向定义
using MOMENT1Data  = FORCE1Data;
using MOMENT1Array = std::vector<SG::DataStructure::FEM::MOMENT1Data>;

DECLSPEC bool operator== (FORCE1Data& lhs, FORCE1Data& rhs);

DECLSPEC bool operator< (const FORCE1Data& SGDataA, const FORCE1Data& SGDataB);

SG_DATASTRUCTURE_FEM_NAMESPACE_CLOSE